package com.itheima.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.itheima.common.entity.QueryPageBean;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.CheckItem;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-12-19
 */
@Mapper
public interface CheckgroupMapper extends BaseMapper<CheckGroup> {

    Page<CheckGroup> findPage(QueryPageBean queryPageBean);

    List<Integer> findCheckItemIdsByCheckGroupId(Integer id);

    CheckGroup findById(Integer id);

    Integer add(CheckGroup checkGroup);

    void addCheckGroupAndCheckItem(Integer id, List<Integer> checkItemIds);

    void edit(CheckGroup checkGroup);

    void deleteCheckGroupAndCheckItem(int id);

    int checkGroupCountId(int id);

    void deleteByCheckId(Integer id);

    List<CheckGroup> findAll();

    List<Integer> findCheckGroupIdsBySetmealId(Integer id);
}
